package cm.com.carlamanda.util;

import java.io.InputStream;
import java.util.Properties;



/**
 * @author chaoqi
 *
 */
public class PropertyUtil{
	public static Properties getProperties(String propertyName){
		Properties properties = null;
		if(properties == null){
			try{
				properties = new Properties();
				InputStream is = null;
				is = PropertyUtil.class.getClassLoader().getResourceAsStream(propertyName);
				if (is != null ){
					properties.load(is);
					is.close();
				}
			 } catch  (Exception e){
				e.printStackTrace();
			 }
		}
		return properties;
	}
}
